#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
    int input;
    scanf("%d", &input);
    if (input % 5)
        printf("NO");
    else
        printf("YES");
}